import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
import java.awt.*;


public class Thread12 extends Thread implements InterInterface{
	private int sle;
	private int exti = 0;
	private int suti = 0;
	public Thread12(String name) {
		super(name);
		sle = 1000;
	
	}
	public void run()
	{
		try {
			exti = Integer.parseInt(txf41.getText());
			for(int i = exti; i > 0 ;i--)
			{
			Thread.sleep(sle);
			txf41.setText(Integer.toString(i-1));
			}
			bt37.setEnabled(false);
			bt38.setEnabled(true);
			
			if(vyes.getText().equals(""))
			vyes.setText(Integer.toString(0));
			if(vno.getText().equals(""))
			vno.setText(Integer.toString(0));
			
			if(Integer.parseInt(vyes.getText()) > Integer.parseInt(vno.getText()))
			JOptionPane.showMessageDialog(null,"WIN : Yes ","Information",JOptionPane.INFORMATION_MESSAGE);
			else if(Integer.parseInt(vyes.getText()) < Integer.parseInt(vno.getText()))
			JOptionPane.showMessageDialog(null,"WIN : No ","Information",JOptionPane.INFORMATION_MESSAGE);
			else
			JOptionPane.showMessageDialog(null,"DRAW !!! ","Information",JOptionPane.INFORMATION_MESSAGE);
			
		}
		catch(InterruptedException ie) {
			ie.printStackTrace();
		}
	}
}
